:root {
  --primary-color: #8b4513;
  --secondary-color: #d2691e;
  --background-color: #2a1810;
  --text-color: #ffffff;
  --accent-color: #ffd700;
  --shadow-color: rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
}

.game-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.game-header {
  text-align: center;
  padding: 20px;
  background: linear-gradient(to bottom, rgba(139, 69, 19, 0.9), rgba(139, 69, 19, 0.7));
  border-radius: 15px;
  box-shadow: 0 4px 15px var(--shadow-color);
  margin-bottom: 30px;
}

.game-title {
  font-size: 2.5em;
  color: var(--accent-color);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 15px;
}

.stats-container {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.stat-item {
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 0.9em;
  color: #ccc;
}

.stat-value {
  font-size: 1.4em;
  font-weight: bold;
  color: var(--accent-color);
}

.main-content {
  display: flex;
  gap: 30px;
  flex: 1;
}

.cookie-section {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.cookie-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
}

.cookie-rays {
  position: absolute;
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

.cookie-click-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 10;
}

.cookie-container {
  position: relative;
  width: 100%;
  height: 100%;
  animation: float 3s ease-in-out infinite;
  transform-origin: center;
}

.cookie-shadow {
  position: absolute;
  width: 90%;
  height: 20px;
  bottom: -30px;
  left: 5%;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  filter: blur(5px);
  transition: all 0.1s ease;
}

.cookie-image {
  width: 100%;
  height: 100%;
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  user-select: none;
  -webkit-user-drag: none;
}

.cookie-container:active .cookie-image {
  transform: scale(0.95);
}

.cookie-container:active .cookie-shadow {
  transform: scale(0.9);
  opacity: 0.5;
}

.cookie-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.store-section {
  flex: 1;
  background: rgba(139, 69, 19, 0.2);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 15px var(--shadow-color);
  min-width: 300px;
}

.store-header {
  text-align: center;
  margin-bottom: 20px;
}

.store-header h2 {
  color: var(--accent-color);
  font-size: 1.8em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.store-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.store-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 15px;
  display: flex;
  gap: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.store-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.store-item:hover::before {
  transform: translateX(100%);
}

.store-item.can-buy {
  background: rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.store-item.can-buy:hover {
  background: rgba(255, 215, 0, 0.15);
  transform: translateY(-2px);
}

.item-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cursor-icon::before {
  content: "🖱️";
  font-size: 1.8em;
}

.grandma-icon::before {
  content: "👵";
  font-size: 1.8em;
}

.item-info {
  flex: 1;
}

.item-name {
  font-size: 1.1em;
  margin-bottom: 8px;
  color: var(--text-color);
}

.upgrade-button {
  width: 100%;
  padding: 8px;
  background: var(--secondary-color);
  border: none;
  border-radius: 5px;
  color: white;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.upgrade-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.upgrade-button:active::after {
  animation: ripple-button 0.6s ease-out;
}

@keyframes ripple-button {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

.item-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  color: #ccc;
}

#particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.cookie-container {
  animation: float 3s ease-in-out infinite;
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }
  
  .store-section {
    min-width: auto;
  }
  
  .cookie-wrapper {
    width: 200px;
    height: 200px;
  }
  
  .stats-container {
    flex-direction: column;
    gap: 15px;
  }
}

.click-particle {
  position: absolute;
  pointer-events: none;
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-color);
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  white-space: nowrap;
}

.combo-counter {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
}

.combo-counter.active {
  opacity: 1;
  transform: translateX(-50%) translateY(-20px);
}

.achievement-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.achievement {
  background: rgba(0, 0, 0, 0.8);
  padding: 15px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-120%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.achievement.show {
  transform: translateX(0);
}

.achievement-icon {
  font-size: 24px;
}

.achievement-info {
  flex: 1;
}

.achievement-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--accent-color);
}

.achievement-desc {
  font-size: 12px;
  color: #ccc;
}

.stats-detail {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 10px;
  padding: 10px;
  margin-top: 5px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 100;
}

.stat-item:hover .stats-detail {
  opacity: 1;
  transform: translateY(0);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,215,0,0.4) 0%, rgba(255,215,0,0) 70%);
  transform: scale(0);
  animation: ripple 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  width: 100px;
  height: 100px;
  margin-left: -50px;
  margin-top: -50px;
}

@keyframes ripple {
  to {
    transform: scale(2);
    opacity: 0;
  }
}

.cookie-power {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: #ccc;
  white-space: nowrap;
}

@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.cookie-container:active {
  animation: shake 0.2s ease-in-out;
} 